<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='zh-CN' xml:lang='zh-CN' xmlns='http://www.w3.org/1999/xhtml'>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta http-equiv="Content-Language" content="zh-CN"/>
        <meta name="robots" content="index, follow" />
        <link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico" />
        <title>氿上网</title>
        <?php echo $this->_var['system_css']; ?>
        <?php echo $this->_var['system_js']; ?>
        <script type="text/javascript">
            $(function(){
                $("#myform").validate({
                    rules: {
                        company_code:{
                            number:true
                        }
                    },
                    messages: {
                        company_code:{
                            number:'邮编必须为数字'
                        }
                    }
                });
            })
        </script>
    </head>
    <body>

        <div id="OSC_Screen">
            <?php echo $this->fetch('header.html'); ?>
            <div id="OSC_Content" class='CenterDiv'>
          <?php echo $this->fetch('user_nav.html'); ?>
                <?php echo $this->fetch('message.html'); ?>
                <div class="MainForm" id="reg_page">
                    <form id="myform" name="myform" action="<?php echo $this->_var['site_url']; ?>usercompany/save_profile" method="post" style="float:left; width:620px;">
                        <table cellspacing='0' cellpadding='0'>

                            <tr id='tr_user'>
                                <th >公司名称：</th>
                                <td>
                                    <input type='text' name='company_name' id='qq' value='<?php echo $this->_var['data']['company_name']; ?>' class='TEXT' style='width:300px;'/>
                                </td>    			
                            </tr>
                            <tr><td height="20"></td></tr>

                            <tr id='tr_user'>
                                <th >公司性质：</th>
                                <td>
                                    <?php if (count ( $this->_var['company_attr_list'] ) > 0): ?>
                                    <?php $_from = $this->_var['company_attr_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'company_attr');$this->_foreach['ca'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['ca']['total'] > 0):
    foreach ($_from AS $this->_var['company_attr']):
        $this->_foreach['ca']['iteration']++;
?>
                                    <?php if ($this->_foreach['ca']['iteration'] % 5 == 0): ?>
                                    <br/>
                                    <?php endif; ?>
                                    <input type="radio" name="company_attr" value="<?php echo $this->_var['company_attr']['id']; ?>" id="ca_<?php echo $this->_var['company_attr']['id']; ?>" <?php if ($this->_var['data']['company_attr'] == $this->_var['company_attr']['id']): ?>checked<?php endif; ?>> <label for="ca_<?php echo $this->_var['company_attr']['id']; ?>"><?php echo $this->_var['company_attr']['name']; ?></label>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php endif; ?>
                                </td>    			
                            </tr>
                            <tr><td height="20"></td></tr>
                            <tr id='tr_user'>
                                <th >工作性质：</th>
                                <td>
                                    <?php if (count ( $this->_var['job_attr_list'] ) > 0): ?>
                                    <?php $_from = $this->_var['job_attr_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'job_attr');$this->_foreach['ja'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['ja']['total'] > 0):
    foreach ($_from AS $this->_var['job_attr']):
        $this->_foreach['ja']['iteration']++;
?>
                                    <?php if ($this->_foreach['ja']['iteration'] % 5 == 0): ?>
                                    <br/>
                                    <?php endif; ?>
                                    <input type="radio" name="company_work_attr" value="<?php echo $this->_var['job_attr']['id']; ?>" id="ja_<?php echo $this->_var['job']['id']; ?>" <?php if ($this->_var['data']['company_work_attr'] == $this->_var['job_attr']['id']): ?>checked<?php endif; ?>> <label for="ja_<?php echo $this->_var['job_attr']['id']; ?>"><?php echo $this->_var['job_attr']['name']; ?></label>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php endif; ?>
                                </td>    
                            </tr>
                            <tr><td height="20"></td></tr>
                            <tr id='tr_user'>
                                <th >工作职务：</th>
                                <td>
                                    <?php if (count ( $this->_var['job_list'] ) > 0): ?>
                                    <?php $_from = $this->_var['job_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'job');$this->_foreach['j'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['j']['total'] > 0):
    foreach ($_from AS $this->_var['job']):
        $this->_foreach['j']['iteration']++;
?>
                                    <?php if ($this->_foreach['j']['iteration'] % 5 == 0): ?>
                                    <br/>
                                    <?php endif; ?>
                                    <input type="radio" name="company_job" value="<?php echo $this->_var['job']['id']; ?>" id="job_<?php echo $this->_var['job']['id']; ?>" <?php if ($this->_var['data']['company_job'] == $this->_var['job']['id']): ?>checked<?php endif; ?>> <label for="job_<?php echo $this->_var['job']['id']; ?>"><?php echo $this->_var['job']['name']; ?></label>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php endif; ?>
                                </td>    			
                            </tr>
                            <tr><td height="20"></td></tr>
                            <tr id='tr_user'>
                                <th >从事专业：</th>
                                <td>
                                    <?php if (count ( $this->_var['work_list'] ) > 0): ?>
                                    <?php $_from = $this->_var['work_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'work');$this->_foreach['w'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['w']['total'] > 0):
    foreach ($_from AS $this->_var['work']):
        $this->_foreach['w']['iteration']++;
?>
                                    <?php if ($this->_foreach['w']['iteration'] % 5 == 0): ?>
                                    <br/>
                                    <?php endif; ?>
                                    <input type="checkbox" name="company_works[]" value="<?php echo $this->_var['work']['id']; ?>" id="work_<?php echo $this->_var['work']['id']; ?>" <?php if (in_array ( $this->_var['work']['id'] , $this->_var['data']['company_works'] )): ?>checked<?php endif; ?>> <label for="work_<?php echo $this->_var['work']['id']; ?>"><?php echo $this->_var['work']['name']; ?></label>
                                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                                        <?php endif; ?>
                                </td>    			
                            </tr>
                            <tr><td height="20"></td></tr>
                            <tr id='tr_user'>
                                <th >通信地址：</th>
                                <td>
                                    <input type='text' name='company_address' id='company_address' value='<?php echo $this->_var['data']['company_address']; ?>' class='TEXT' style='width:300px;'/>
                                </td>    			
                            </tr>

                            <tr id='tr_user'>
                                <th >邮编：</th>
                                <td>
                                    <input type='text' name='company_code' id='company_code' value='<?php echo $this->_var['data']['company_code']; ?>' class='TEXT' style='width:300px;'/>
                                </td>    			
                            </tr>


                            <tr id='tr_user'>
                                <th >电话：</th>
                                <td>
                                    <input type='text' name='company_phone' id='company_phone' value='<?php echo $this->_var['data']['company_phone']; ?>' class='TEXT' style='width:300px;'/>
                                </td>    			
                            </tr>

                            <tr id='tr_area'>
                                <th>公司简介：</th>	
                                <td class="y-bg"><textarea style="height:80px; width:100%" id="value" cols="50" rows="2" name="company_description"><?php echo $this->_var['data']['company_description']; ?></textarea>
                                </td>
                            </tr>

                            <tr class='buttons'>
                                <th>&nbsp;</th>		
                                <td style='padding:20px 0;'>
                                    <input type='submit' value=' 更改 ' class='BUTTON SUBMIT'/><br/><br/>
                                </td>
                            </tr>
                        </table>
                    </form>
                    <div class='clear'></div>
                </div>

            </div>
            <div class='clear'></div></div>
        <div class='clear'></div>
        <?php echo $this->fetch('footer.html'); ?>
        </div>

    </body>
</html>
